
package ConversorDWDM.view;

import java.awt.Toolkit;

public class Tabela extends javax.swing.JFrame
{
    public Tabela()
    {
        initComponents();
        setIcon();
    }
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jScrollPane4 = new javax.swing.JScrollPane();
        Tabela_Canais = new javax.swing.JTable();
        Label_Nome_Tabela = new javax.swing.JLabel();
        Botao_voltar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Tabela de Canais");

        Tabela_Canais.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                { new Integer(21), "192,10 THz", "1560,61 nm", "C par",  new Integer(40)},
                { new Integer(22), "192,20 THz", "1559,79 nm", "C par",  new Integer(39)},
                { new Integer(23), "192,30 THz", "1558,98 nm", "C par",  new Integer(38)},
                { new Integer(24), "192,40 THz", "1558,17 nm", "C par",  new Integer(37)},
                { new Integer(25), "192,50 THz", "1557,36 nm", "C par",  new Integer(36)},
                { new Integer(26), "192,60 THz", "1556,55 nm", "C par",  new Integer(35)},
                { new Integer(27), "192,70 THz", "1555,75 nm", "C par",  new Integer(34)},
                { new Integer(28), "192,80 THz", "1554,94 nm", "C par",  new Integer(33)},
                { new Integer(29), "192,90 THz", "1554,13 nm", "C par",  new Integer(32)},
                { new Integer(30), "193,00 THz", "1553,33 nm", "C par",  new Integer(31)},
                { new Integer(31), "193,10 THz", "1552,52 nm", "C par",  new Integer(30)},
                { new Integer(32), "193,20 THz", "1551,72 nm", "C par",  new Integer(29)},
                { new Integer(33), "193,30 THz", "1550,92 nm", "C par",  new Integer(28)},
                { new Integer(34), "193,40 THz", "1550,12 nm", "C par",  new Integer(27)},
                { new Integer(35), "193,50 THz", "1549,32 nm", "C par",  new Integer(26)},
                { new Integer(36), "193,60 THz", "1548,51 nm", "C par",  new Integer(25)},
                { new Integer(37), "193,70 THz", "1547,72 nm", "C par",  new Integer(24)},
                { new Integer(38), "193,80 THz", "1546,92 nm", "C par",  new Integer(23)},
                { new Integer(39), "193,90 THz", "1546,12 nm", "C par",  new Integer(22)},
                { new Integer(40), "194,00 THz", "1545,32 nm", "C par",  new Integer(21)},
                { new Integer(41), "194,10 THz", "1544,53 nm", "C par",  new Integer(20)},
                { new Integer(42), "194,20 THz", "1543,73 nm", "C par",  new Integer(19)},
                { new Integer(43), "194,30 THz", "1542,94 nm", "C par",  new Integer(18)},
                { new Integer(44), "194,40 THz", "1542,14 nm", "C par",  new Integer(17)},
                { new Integer(45), "194,50 THz", "1541,35 nm", "C par",  new Integer(16)},
                { new Integer(46), "194,60 THz", "1540,56 nm", "C par",  new Integer(15)},
                { new Integer(47), "194,70 THz", "1539,77 nm", "C par",  new Integer(14)},
                { new Integer(48), "194,80 THz", "1538,98 nm", "C par",  new Integer(13)},
                { new Integer(49), "194,90 THz", "1538,19 nm", "C par",  new Integer(12)},
                { new Integer(50), "195,00 THz", "1537,40 nm", "C par",  new Integer(11)},
                { new Integer(51), "195,10 THz", "1536,61 nm", "C par",  new Integer(10)},
                { new Integer(52), "195,20 THz", "1535,82 nm", "C par",  new Integer(9)},
                { new Integer(53), "195,30 THz", "1535,04 nm", "C par",  new Integer(8)},
                { new Integer(54), "195,40 THz", "1534,25 nm", "C par",  new Integer(7)},
                { new Integer(55), "195,50 THz", "1533,47 nm", "C par",  new Integer(6)},
                { new Integer(56), "195,60 THz", "1532,68 nm", "C par",  new Integer(5)},
                { new Integer(57), "195,70 THz", "1531,90 nm", "C par",  new Integer(4)},
                { new Integer(58), "195,80 THz", "1531,12 nm", "C par",  new Integer(3)},
                { new Integer(59), "195,90 THz", "1530,33 nm", "C par",  new Integer(2)},
                { new Integer(60), "196,00 THz", "1529,55 nm", "C par",  new Integer(1)}
            },
            new String [] {
                "Canal", "Frequência", "Comprimento de Onda", "Banda", "Porta Física MUX/DMUX"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, true, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane4.setViewportView(Tabela_Canais);

        Label_Nome_Tabela.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        Label_Nome_Tabela.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        Label_Nome_Tabela.setText("Tabela de Canais - DWDM");

        Botao_voltar.setText("Voltar");
        Botao_voltar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Botao_voltarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 683, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(Botao_voltar, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(20, 20, 20))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(Label_Nome_Tabela)
                        .addGap(265, 265, 265))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(15, 15, 15)
                .addComponent(Label_Nome_Tabela)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 535, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 22, Short.MAX_VALUE)
                .addComponent(Botao_voltar)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void Botao_voltarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Botao_voltarActionPerformed
        dispose();
    }//GEN-LAST:event_Botao_voltarActionPerformed

    public static void main(String args[]) {
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Tabela.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Tabela.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Tabela.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Tabela.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                new Tabela().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton Botao_voltar;
    private javax.swing.JLabel Label_Nome_Tabela;
    public volatile javax.swing.JTable Tabela_Canais;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JScrollPane jScrollPane4;
    // End of variables declaration//GEN-END:variables

    private void setIcon()
    {
        setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("color.png")));
    }
}
